<?php
$socialfeeds = $this->helper('socialfeeds');

$fb_result = $socialfeeds->getFBFans();
if ($fb_result) : ?>
<?php 
    $fb_fans = $fb_result['fans'];
?>


<div class="block block-facebook-like ">
        <div class="block-title">
            <strong>
                <span><?php echo $this->__('Facebook') ?></span>
                <a target="_blank" href="<?php echo $fb_result['link'] ?>" class="btn-like f-right">
                    <?php echo $this->__('Like!') ?>
                </a>
            </strong>
        </div>

        <div class="block-content">
            <div class="clearfix fb-persons">
                <?php echo $fb_fans ?>
            </div>
        </div>
    </div>                

    
 <script type="text/javascript">
   jQuery( ".block-facebook-like .block-title" ).click(function() {
       winWidth = jQuery(window).innerWidth();
       if( winWidth < 767){
            jQuery(".block-facebook-like .block-title").toggleClass("open");
            jQuery( ".block-facebook-like .block-content" ).slideToggle( "slow", function() {
            // Animation complete.
            });
       }
});
</script>
<?php endif; ?>